package com.css.fxfzysx.modules.ysxManagement.controller;

import com.css.fxfzysx.base.response.RestResponse;
import com.css.fxfzysx.modules.ysxManagement.service.CecMainService;
import com.css.fxfzysx.modules.ysxManagement.vo.CnRatioVo;
import com.css.fxfzysx.modules.ysxManagement.vo.SrBaselineVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 通讯设备系数维护
 */
@RestController
@RequestMapping("cecMain")
public class CecMainController {

    @Autowired
    private CecMainService cecMainService;

    /**
     * 通讯设备重要度系数添加或修改
     * @param cnRatioVo
     * @return
     */
    @PostMapping("saveOrUpdateCnRatio")
    public RestResponse saveOrUpdateCnRatio(@RequestBody CnRatioVo cnRatioVo){
        return cecMainService.saveOrUpdateCnRatio(cnRatioVo);
    }

    /**
     * 通讯设备重要系数查询
     * @param titleName
     * @return
     */
    @GetMapping("getAllCnRatio")
    public RestResponse getAllCnRatio(String titleName){
        return cecMainService.getAllCnRatio(titleName);
    }

    /**
     * 通讯设备重要系数删除
     * @param cnRatioIds
     * @return
     */
    @GetMapping("deleteCnRatioById")
    public RestResponse deleteCnRatioById(String cnRatioIds,String arrangeIds){
        return cecMainService.deleteCnRatioById(cnRatioIds,arrangeIds);
    }

    /**
     * 地震影晌系数基准值添加或修改
     * @param srBaselineVo
     * @return
     */
    @PostMapping("saveOrUpdateSrBaseline")
    public RestResponse saveOrUpdateSrBaseline(@RequestBody SrBaselineVo srBaselineVo){
        return cecMainService.saveOrUpdateSrBaseline(srBaselineVo);
    }

    /**
     * 地震影晌系数基准值查询
     * @param titleName
     * @return
     */
    @GetMapping("getAllSrBaseline")
    public RestResponse getAllSrBaseline(String titleName){
        return cecMainService.getAllSrBaseline(titleName);
    }

    /**
     * 地震影晌系数基准值删除
     * @param srBaselineIds
     * @return
     */
    @GetMapping("deleteSrBaselineById")
    public RestResponse deleteSrBaselineById(String srBaselineIds,String arrangeIds){
        return cecMainService.deleteSrBaselineById(srBaselineIds,arrangeIds);
    }

}
